<div class="menu"> 
<%= render :partial => 'login' %>
<% if logged_in? %>
| <%= link_to 'New', :action => 'new' %>
<% end %>
</div>

<table>
<tr><th class='title'><%=h 'title' %></th><th class='date'><%= h 'date' %></th>
<th class='site'><%=h 'site' %></th><th class='show'></th>
<% if logged_in? %>
<th class='edit'></th><th class='delete'></th>
<% end %>
</tr>
<%
@pages.each do |page|
%>
<tr>
<td><%=h "#{page.title}" %></td>
<td class="date"><%=h "#{page.created_at.strftime('%Y/%m/%d %H:%M')}" %></td>
<td><%=h "#{page.site}" %></td>
<td class="show"><%= link_to 'Show', :action => 'show', :id => page %></td>
<% if logged_in? %>
<td class="edit"><%= link_to 'Edit', :action => 'edit', :id => page %></td>
<td class="delete"><%= link_to 'Delete', :action => 'delete', :id => page %></td>
<% end %>
</tr>
<% end %> 
</table>
